package kr.co.fish.framework.dao;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.ibatis.sqlmap.client.SqlMapClient;

public class CustomerDao extends SqlMapClientDaoSupport {
	
	@Resource(name="sqlMapClient")
	public void setSuperSqlMapClient(SqlMapClient sqlMapClient){
		super.setSqlMapClient(sqlMapClient);
	}
	
	public Object insert(String statementName, Object parameterObject) throws DataAccessException {
		return getSqlMapClientTemplate().insert(statementName, parameterObject);
	}
	
	public int update(String statementName, Object parameterObject) throws DataAccessException {
		return getSqlMapClientTemplate().update(statementName, parameterObject);
	}
	
	public Object queryForObject(String statementName, Object parameterObject) throws DataAccessException {
		return getSqlMapClientTemplate().queryForObject(statementName, parameterObject);
	}
	
	public List<?> queryForList(String statementName, Object parameterObject) throws DataAccessException {
		return getSqlMapClientTemplate().queryForList(statementName, parameterObject);
	}

}
